<div class="bg-light lter b-b wrapper-md">
    <h1 class="m-n font-thin h3">注册新成员</h1>
</div>
<!-- toaster directive -->
<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>

<div class="wrapper-md" ng-controller="memberCtrl">
    <div class="row">
        <div class="col-sm-6">
            <div class="panel panel-default">
                <div class="panel-heading font-bold">添加会员</div>
                <div class="panel-body">
                    <form class="bs-example form-horizontal form-validation" name="myForm" novalidate>
                        <div class="form-group">
                            <label class="col-lg-2 control-label">用户名</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control" placeholder="用户名*" ng-model="user.username" required>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-lg-2 control-label">基金类型</label>
                            <div class="col-lg-10">
                                <select class="form-control" ng-model="user.company">
                                    <option value="2">课程</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-lg-2 control-label">等级</label>
                            <div class="col-lg-10">
                                <select class="form-control" ng-model="user.level">
                                    <option value="0">初级</option>
                                    <option value="1">中级</option>
                                    <option value="2">高级</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-lg-2 control-label">备注</label>
                            <div class="col-lg-10">
                                <textarea class="form-control" rows="6" placeholder="备注*" ng-model="user.remarks" required></textarea>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-lg-offset-2 col-lg-10">
                                <button type="submit" class="btn btn-info" ng-disabled="myForm.$invalid || btn_disabled" ng-click="addMember()">提交</button>
                            </div>
                        </div>


                    </form>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
            <div class="panel panel-default">
                <div class="panel-heading font-bold">添加非会员</div>
                <div class="panel-body">
                    <form class="bs-example form-horizontal ng-pristine ng-valid" name="myForm1">
                        <div class="form-group">
                            <label class="col-lg-2 control-label">用户名</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control" placeholder="用户名" ng-model="noUser.name" required>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-2 control-label">性别</label>
                            <div class="col-lg-10">
                                <div class="radio">
                                    <label>
                                        <input type="radio" name="optionsRadios" ng-model="noUser.sex" value="0" required>男
                                    </label>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <label>
                                        <input type="radio" name="optionsRadios" ng-model="noUser.sex" value="1" required>女
                                    </label>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-lg-2 control-label">手机号</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control" placeholder="手机号" ng-model="noUser.phone" ng-pattern="/^1[3|4|5|8][0-9]\d{4,8}$/"
                                    required>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-lg-2 control-label">邮箱</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control" placeholder="邮箱" ng-model="noUser.email" ng-pattern="/^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/"
                                    required>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-lg-2 control-label">基金类型</label>
                            <div class="col-lg-10">
                                <select class="form-control" ng-model="noUser.company">
                                    <option value="2">课程</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-lg-2 control-label">备注</label>
                            <div class="col-lg-10">
                                <textarea class="form-control" rows="6" placeholder="备注*" ng-model="noUser.remarks" required></textarea>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-lg-2 control-label">地址</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control" placeholder="地址" ng-model="noUser.address" required>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-lg-2 control-label">身份证号</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control" placeholder="身份证号" ng-model="noUser.idcard" ng-pattern="/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/" required>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-offset-2 col-lg-10">
                                <button type="submit" class="btn btn-sm btn-info" ng-disabled="myForm1.$invalid || btn_disabled" ng-click="addNoMember()">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>